From: "Stefan Stuntz" 
Date:   Wed, 24 Jan 1996 12:50:24 +0100
X-Mailer: IntuiNews 1.3b Beta 5 (3.1.96)
Subject: Re: EditHook and obj pointer
Message-Id: <81318540@magic.informatik.tu-muenchen.de>
Organization: Home of MUI
Resent-Message-Id: <"OBTpk.0.-U1.IZY1n"@sunsite>
Resent-From: mui@sunsite.Informatik.RWTH-Aachen.DE
Reply-To: mui@sunsite.Informatik.RWTH-Aachen.DE
X-Mailing-List:  archive/latest/180
X-Loop: mui@sunsite.informatik.rwth-aachen.de
Precedence: list
Resent-Sender: mui-request@sunsite.Informatik.RWTH-Aachen.DE
Content-Type: text
Content-Length: 541
X-Lines: 16
Status: RO

Jean-Francois PIK wrote in article <1041.6596T1115T1839@club-internet.fr>:

>   I'm using an edithook with in a StringObject class;
>   but when i'm in the hook how can I have the pointer
>   to the caller's object?
>   I need to catch the UserData from the caller's obj!
>   thank you...

Since you are a hook, you can place everything you want
in hook->h_Data. The hook structure is probably placed
best in the instance data of the subclass of MUIC_String
that you should create when building custom string gadgets.

--
Greetings, Stefan


From: McBoe@abyss.apl.s.shuttle.de (Jens Boenisch)
Subject: Re: Q:Hooks, MUI and dispatchers
Message-Id: <22598167.u7t157e.5cc60-McBoe@abyss.apl.s.shuttle.de>
Date: Sat, 06 Apr 1996 00:52:00 GMT
Resent-Message-Id: <"kVlGI3.0.ZZ6.HYTPn"@sunsite>
Resent-From: mui@sunsite.Informatik.RWTH-Aachen.DE
X-Mailing-List:  archive/latest/949
X-Loop: mui@sunsite.informatik.rwth-aachen.de
Precedence: list
Resent-Sender: mui-request@sunsite.Informatik.RWTH-Aachen.DE
Content-Type: text
Content-Length: 884
X-Lines: 22
Status: RO

Hi joop (joop van de wege), in  on Apr 05 you wrote:

> >You have to write assembler stubs to copy the parameters from the registers
> >onto the stack and call the original functions from the examples.
> >So short ... or implement register parameters into the compiler :) ...

> Thats what HookEntry is all about. It does that, have a look at the source
> from AmigaFAQ, programmers section.

No, HookEntry and the struct Hook itself ist for functions that get a hook
as parameter, not for a dispatcher of a custom BOOPSI class.

> What I want to know is do I specify HookEntry() as the dispatcher function or
> should I use HookEntry() in the dispatcher function itself??

Neither. Write your assembler-stub to push the paramters on the stack and
call your c function. YOU NEED NO HOOK !

So short ... is it so difficult to understand this ? ...

        Jens